/*
 * @Author: LVGRAPE
 * @LastEditors: LVGRAPE
 */
#ifndef _RGB_H
#define _RGB_H
#include "at32f421.h"

typedef enum {
    RGB_STANDBY,
    RGB_STATE_COUNT,
}rgb_state_t;
uint32_t get_rgb_state(void);
void rgb_gpio_init(void);
void rgb_set(uint8_t r, uint8_t g, uint8_t b);
void rgb_tmr_init(void);
void rled(confirm_state state);
void gled(confirm_state state);
void bled(confirm_state state);
void rgb_state_handle();
void rgb_state_set(rgb_state_t s);
void rgb_state_clr(rgb_state_t s);
int at32_tmr_pwm_dma_init(void);
void rgb_set_color(uint8_t index, uint8_t r, uint8_t g, uint8_t b);
#endif
